// 文件上传模块相关的TypeScript类型定义

/**
 * 文件信息
 */
export interface FileInfo {
  id: number
  fileName: string
  originalName: string
  filePath: string
  fileUrl: string
  fileType: 'image' | 'video' | 'document'
  mimeType: string
  fileSize: number
  width?: number
  height?: number
  storageType: 'LOCAL' | 'OSS' | 'COS' | 'S3'
  category: 'AVATAR' | 'CERTIFICATE' | 'TRAINING' | 'COURSE' | 'ANNOUNCEMENT' | 'OTHER'
  uploaderId: number
  relatedId?: number
  isPublic: boolean
  createdAt: string
  updatedAt: string
}

/**
 * 文件上传请求参数
 */
export interface UploadFileRequest {
  file: File
  category: 'AVATAR' | 'CERTIFICATE' | 'TRAINING' | 'COURSE' | 'ANNOUNCEMENT' | 'OTHER'
  relatedId?: number
  isPublic?: boolean
}

/**
 * 批量文件上传请求参数
 */
export interface UploadBatchFilesRequest {
  files: File[]
  category: 'AVATAR' | 'CERTIFICATE' | 'TRAINING' | 'COURSE' | 'ANNOUNCEMENT' | 'OTHER'
  relatedId?: number
  isPublic?: boolean
}

/**
 * 文件上传响应数据
 */
export interface UploadFileResponse {
  id: number
  fileName: string
  fileUrl: string
  fileType: 'image' | 'video' | 'document'
  mimeType: string
  fileSize: number
  width?: number
  height?: number
}

/**
 * 文件列表响应数据
 */
export interface FileListResponse {
  list: FileInfo[]
  total: number
  page: number
  pageSize: number
}

/**
 * 训练照片信息
 */
export interface TrainingPhoto {
  id: number
  memberId: number
  fileId: number
  fileUrl: string
  photoDate: string
  bodyPart?: 'FRONT' | 'BACK' | 'SIDE' | 'OTHER'
  weight?: number
  bodyFat?: number
  description?: string
  isPublic: boolean
  createdAt: string
  updatedAt: string
}

/**
 * 训练照片上传请求参数
 */
export interface UploadTrainingPhotoRequest {
  file: File
  photoDate: string
  bodyPart?: 'FRONT' | 'BACK' | 'SIDE' | 'OTHER'
  weight?: number
  bodyFat?: number
  description?: string
  isPublic?: boolean
}

/**
 * 训练照片列表响应数据
 */
export interface TrainingPhotoListResponse {
  list: TrainingPhoto[]
  total: number
  page: number
  pageSize: number
}

/**
 * 教练证书信息
 */
export interface CoachCertificate {
  id: number
  coachId: number
  fileId: number
  fileUrl: string
  certificateName: string
  certificateNo?: string
  issueDate?: string
  expireDate?: string
  issuingAuthority?: string
  status: 'PENDING' | 'APPROVED' | 'REJECTED'
  rejectReason?: string
  verifiedAt?: string
  verifiedBy?: number
  createdAt: string
  updatedAt: string
}

/**
 * 教练证书上传请求参数
 */
export interface UploadCoachCertificateRequest {
  file: File
  certificateName: string
  certificateNo?: string
  issueDate?: string
  expireDate?: string
  issuingAuthority?: string
}

/**
 * 教练证书列表响应数据
 */
export interface CoachCertificateListResponse {
  list: CoachCertificate[]
  total: number
  page: number
  pageSize: number
}

/**
 * 证书审核请求参数
 */
export interface VerifyCertificateRequest {
  status: 'APPROVED' | 'REJECTED'
  rejectReason?: string
}
